function isNumber(charCode)
{
   if(charCode>=48 && charCode<=57)
	   return true;
   return false;
}

function isLetter(charCode)
{
   if(charCode>=97 && charCode<=122)
	   return true;
   if(charCode>=65 && charCode<=90)
	   return true;
   return false;
}

function isDeletePressed(charCode)
{
   if(charCode == 127 || charCode == 8)
	   return true;
	return false;
}

function getCharCode(evt)
{
	return (evt.which) ? evt.which : evt.keyCode;
}

function isPasswordKey(evt)
{
   var charCode = getCharCode(evt);
   return (isLetter(charCode) || isNumber(charCode) || isDeletePressed(charCode) || charCode==9);
}

function isNumberKey(evt)
{
   var charCode = getCharCode(evt);
   return (isNumber(charCode) || isDeletePressed(charCode) || charCode==9);
}

function isLetterKey(evt)
{
   var charCode = getCharCode(evt);
   return (isLetter(charCode) || isDeletePressed(charCode));
}

function isNameKey(evt)
{
	var charCode = getCharCode(evt);
	return (isLetter(charCode) || isDeletePressed(charCode) || charCode == 32 || charCode==9);
}

function isDateKey(evt)
{
   var charCode = getCharCode(evt);
   return (isNumber(charCode) || isDeletePressed(charCode) || charCode == 46 || charCode==9);
}
